<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="vue.js"></script>

</head>
<body>
  <div id="app">
    <div :style="a"></div>
    <hr>
    <div :style="{width:w+'px',height:h+'px',background:bg}"></div>
    <hr>
    <input type="text" v-model="w">
    <input type="text" v-model="h">
  </div>
  <script>
    let vm = new Vue({
      el:"#app",
      data:{
        a:{
          width:"200px",
          height:"200px",
          background:"red"
        },
        w:100,
        h:100,
        bg:"green"

      }
    })
  </script>
</body>
</html>